package com.sj.purchase.modules.cost.domain;

import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @author: songkaizong
 * 18-1-9 下午4:48
 */
@Entity
@Table(name = "t_profit")
public class Profit {
    @EmbeddedId
    private ProfitId id;
    private int orderNum;
    private double profit;//imei利润
    private double avgPriceProfit;
    private int imeiNum;

    public Profit(ProfitId id, int orderNum, double profit, double avgPriceProfit, int imeiNum) {
        this.id = id;
        this.orderNum = orderNum;
        this.profit = profit;
        this.avgPriceProfit = avgPriceProfit;
        this.imeiNum = imeiNum;
    }

    public Profit() {
    }

    public ProfitId getId() {
        return id;
    }

    public void setId(ProfitId id) {
        this.id = id;
    }

    public int getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(int orderNum) {
        this.orderNum = orderNum;
    }

    public double getProfit() {
        return profit;
    }

    public void setProfit(double profit) {
        this.profit = profit;
    }

    public double getAvgPriceProfit() {
        return avgPriceProfit;
    }

    public void setAvgPriceProfit(double avgPriceProfit) {
        this.avgPriceProfit = avgPriceProfit;
    }

    public int getImeiNum() {
        return imeiNum;
    }

    public void setImeiNum(int imeiNum) {
        this.imeiNum = imeiNum;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("Profit{");
        sb.append("id=").append(id);
        sb.append(", orderNum=").append(orderNum);
        sb.append(", profit=").append(profit);
        sb.append(", avgPriceProfit=").append(avgPriceProfit);
        sb.append(", imeiNum=").append(imeiNum);
        sb.append('}');
        return sb.toString();
    }
}
